package com.nation.domain;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Date;

/**
 * Created by dqd on 2017/11/9.
 */
@Entity
@Table(name = "V_important_research_work", schema = "show_nation", catalog = "")
public class VImportantResearchWork implements Serializable{
    private String author;
    private String country_code;
    private String e_book;
    private int id;
    private String publisher;
    private Date publish_time;
    private String recoder_id;
    private Date recoderTime;
    private String title;
    private String nation_z;

    @Basic
    @Column(name = "author", nullable = false, length = 100)
    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Basic
    @Column(name = "country_code", nullable = false, length = 4)
    public String getCountry_code() {
        return country_code;
    }

    public void setCountry_code(String country_code) {
        this.country_code = country_code;
    }

    @Basic
    @Column(name = "e_book", nullable = false, length = 255)
    public String getE_book() {
        return e_book;
    }

    public void setE_book(String e_book) {
        this.e_book = e_book;
    }

    @Basic
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "publisher", nullable = false, length = 200)
    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    @Basic
    @Column(name = "publish_time", nullable = false)
    public Date getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(Date publish_time) {
        this.publish_time = publish_time;
    }

    @Basic
    @Column(name = "recoder_id", nullable = false, length = 3)
    public String getRecoder_id() {
        return recoder_id;
    }

    public void setRecoder_id(String recoder_id) {
        this.recoder_id = recoder_id;
    }

    @Basic
    @Column(name = "recoder_time", nullable = false)
    public Date getRecoderTime() {
        return recoderTime;
    }

    public void setRecoderTime(Date recoderTime) {
        this.recoderTime = recoderTime;
    }

    @Basic
    @Column(name = "title", nullable = false, length = 100)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "nation_z", nullable = false, length = 255)
    public String getNation_z() {
        return nation_z;
    }

    public void setNation_z(String nation_z) {
        this.nation_z = nation_z;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VImportantResearchWork that = (VImportantResearchWork) o;

        if (id != that.id) return false;
        if (author != null ? !author.equals(that.author) : that.author != null) return false;
        if (country_code != null ? !country_code.equals(that.country_code) : that.country_code != null) return false;
        if (e_book != null ? !e_book.equals(that.e_book) : that.e_book != null) return false;
        if (publisher != null ? !publisher.equals(that.publisher) : that.publisher != null) return false;
        if (publish_time != null ? !publish_time.equals(that.publish_time) : that.publish_time != null) return false;
        if (recoder_id != null ? !recoder_id.equals(that.recoder_id) : that.recoder_id != null) return false;
        if (recoderTime != null ? !recoderTime.equals(that.recoderTime) : that.recoderTime != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (nation_z != null ? !nation_z.equals(that.nation_z) : that.nation_z != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = author != null ? author.hashCode() : 0;
        result = 31 * result + (country_code != null ? country_code.hashCode() : 0);
        result = 31 * result + (e_book != null ? e_book.hashCode() : 0);
        result = 31 * result + id;
        result = 31 * result + (publisher != null ? publisher.hashCode() : 0);
        result = 31 * result + (publish_time != null ? publish_time.hashCode() : 0);
        result = 31 * result + (recoder_id != null ? recoder_id.hashCode() : 0);
        result = 31 * result + (recoderTime != null ? recoderTime.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (nation_z != null ? nation_z.hashCode() : 0);
        return result;
    }
}
